Java API

To use the Java API for TPT, include in your Java project <TPT installation path>\public\tptapi.jar.

The example file <TPT installation folder>\examples\TPT-API\api-example.zip contains a Java Eclipse project. You can import it directly into Eclipse.

The examples illustrate how to model a test case (ExampleTestModeling.java) and how to execute test sets (ExampleTestExecution.java) when using the Java TPT API. Read Readme.txt to get more information.

To open the Java TPT API documentation:

Click 'TPT API' to open the Java TPT API documentation

To learn how the Java TPT API documentation is organized, click Help, see (2) in Figure " Click 'TPT API' to open the Java TPT API documentation".

Using the TPT API from within MATLAB

It is possible to use TPT API function calls from within MATLAB. To do so, add at least the following lines to the m-script:

if(~exist('com.piketec.tpt.api.TptApi', 'class'))

javaaddpath([tptInstallPath, '\public\tptapi.jar'])

end

TPTAPI = com.piketec.tpt.api.TptApiUtils.connect('TptApi', 1099);

You can omit the first three lines if you have installed the TPT Toolbox in MATLAB, see also MATLAB/Simulink platform - TPT Toolbox.

When calling the TPT API from a MATLAB instance with the TPT environment intialized, do not call any TPT API functions that will cause TPT to make a call to MATLAB. This may cause a deadlock. Use a second MATLAB instance instead for calling the TPT API.